package clids.ex2.orders;

import java.io.File;
import java.util.Comparator;

public class OrderFileComparator implements Comparator<String> {
	//implementation of file name comparator;
	public int compare(String o1, String o2) {
		File f1 = new File(o1);
		File f2 = new File(o2);
		if (f1.getName().compareTo(f2.getName()) == 0) {
			return o1.compareTo(o2);
		}
		return f1.getName().compareTo(f2.getName());

	}

}
